<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/lib/Sanpham.php';
$sanphamOb = new Sanpham();
$listSPDM = $sanphamOb->laySanPhamTheoDanhMuc($_GET['id']);
?>
<?php if (mysql_num_rows($listSPDM) > 0): ?>
    <?php while ($sp = mysql_fetch_assoc($listSPDM)): ?>
        <div class="pic">
            <p>
                <img width="160px" src="<?php echo $sp['hinhanh'] ?>" alt="img" /></p>
            <p class="text5"><?php echo $sp['ten'] ?> <br />
                <strong> Giá bán: <?php echo $sp['gia'] ?> VNĐ </strong></p>
            <p>
                <a class="det" target="_blank" href="">
                    <img src="imges/btn-chon.gif" alt="img" />
                </a>
                <a href="index.php?id=<?php echo $sp['id'] ?>">
                    <img class="chitiet-sanpham" src="imges/btn-chitiet.gif" alt="img" />
                </a>
            </p>
        </div>
    <?php endwhile; ?>
<?php else: ?>
    <p style="padding: 10px">Không có sản phẩm thuộc danh mục này</p>
<?php endif; ?>

